<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>农村道路交通管理综合应用系统</title>
<style type="text/css">
body {
	background-color: #023678;
	background-image: url(<%=path %>/images/033.jpg);
	background-repeat: repeat-x;
}
</style>
<script type="text/javascript">
		function choiceSubMenu(){
			window.showModalDialog("<%=path %>/insertuser.jsp",window,"status:no;scroll:no;dialogWidth:245px;dialogHeight:400px"); 
	    }

	function submit1() {
		var user_name = document.getElementById("username");
		var password = document.getElementById("password");
		
		if(password.value.length < 1 || user_name.value.length < 1){
			showMsg("账号和密码均不可为空！");
			return false;
		} else {
			var form = document.getElementById("loginForm");
			form.action = "<%=path %>/system/login.action";
			form.submit();
		}
	}
	function reset1(){
		var form = document.getElementById("loginForm");
		form.reset();
	}
	function showMsg(msg){
		document.getElementById('showmsg').style.display = 'block';
		document.getElementById('showmsg').innerText = msg;
		window.setTimeout("hiddenMsg()", 3000);
	}
	function hiddenMsg(){
		document.getElementById('showmsg').style.display = 'none';
		document.getElementById('showmsg').innerText = '';
	}
</script>
</head>
<body >
<form id="loginForm" action="#" method="post">
<table width="979" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="180">&nbsp;</td>
  </tr>
</table>
<table width="979" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="541" align="center" valign="top" background="<%=path %>/images/025.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="190">&nbsp;</td>
      </tr>
    </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="500" height="12" align="center" valign="bottom"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="300">&nbsp;</td>
              <td align="center" class="zi_003"><a href="javascript:choiceSubMenu()" class="zi_003" id="PopupDivBtn_35"><strong>注册新用户</strong></a> <a href="#" class="zi_003"><strong>忘记用户名？</strong></a></td>
            </tr>
          </table></td>
          <td width="260"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="80" height="30" align="right" class="zi_007">用户名：</td>
              <td><input name="loginVo.username" type="text" class="kk_001" id="username"></td>
            </tr>
            <tr>
              <td width="80" height="30" align="right" class="zi_007">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
              <td><input name="loginVo.password" type="password" class="kk_001" id="password"></td>
            </tr>
            <tr>
              <td width="80" height="50" align="right">&nbsp;</td>
              <td><input type="image" onclick="return reset1()" src="<%=path %>/images/026.jpg">
                <input type="image" id="submit1" onclick="return submit1()" src="<%=path %>/images/027.jpg"></td>
            </tr>
            <tr>
              <td colspan="2" height="28" align="center" valign="middle"><font id="showmsg" color="red"></font></td>
            </tr>
          </table></td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="180" align="center" valign="bottom" class="zi_002">农村道路交通管理综合应用系统 版权所有 </td>
        </tr>
      </table></td>
  </tr>
</table>
</form>
<script type="text/javascript">
window.onload = function(){
	var oInput = document.getElementById("username");
	oInput.focus();
}
document.onkeydown=function(event){ 
    e = event ? event :(window.event ? window.event : null); 
    if(e.keyCode==13){ 
        submit1(); 
        return false;//return false 为了防止表单的自动提交
    } 
} 
var msg = "${requestScope.rMsg}";
if(msg != ""){
	showMsg(msg);
}
</script>
</body>
</html>
